package cn.xiaohuodui.constant;

/**
 * Author :chenqisheng
 * Date   :15/3/30.
 */
public enum ErrorCodeDefine {
    //通用错误
    DEFAULT_ERROR(100, "默认错误"),
    RECORD_NOT_EXISTS(101, "记录不存在"),
    PARAMS_FORM_NOT_VALID(102, "参数表单不合法"),
    UNAUTHORIZED(103, "权限不足"),
    MESSAGE_SEND_ERROR(104, "消息推送失败"),
    DEFAULT_SUCCESS(200,"默认成功"),
    UN_LOGIN(401,"未登录"),

    SMS_SEND_ERROR(1001, "短信发送失败"),
    PHONE_IS_NOT_FOUND(1002, "手机号未找到"),
    USER_NOT_FOUND(1003, "用户未找到"),
    SMS_CODE_NOT_VALID(1004, "短信验证码不正确"),
    PHONE_IS_USED(1005, "手机号已被使用"),
    PASSWORD_NOT_VALID(1006, "密码不正确"),
    INVITE_COD_NOT_VALID(1007, "邀请码不正确"),
    OLD_PASSWORD_NOT_VALID(1008, "原密码不正确"),
    SOCIAL_NOT_FOUND(1009, "社交信息还未绑定，请绑定后登录"),
    SOCIAL_IS_BIND(1010, "社交信息已绑定"),
    SOCIAL_IS_UNBIND(1011, "社交信息已取消绑定"),
    USER_VIP_NOT_FOUND(1012, "用户不是Vip"),
    USER_VIP_CODE_NOT_FOUND(1013, "兑换码失效了"),
    USER_VIP_CODE_EMPTY(1014, "兑换码已领完"),
    SOCIAL_IS_BIND_BY_OTHER(1015, "已被其它人绑定"),
    PHONE_IS_BINDED(1016, "已被绑定手机号"),
    EMAIL_CODE_NOT_FOUND(1017, "邮箱验证码未找到"),
    EMAIL_IS_USED(1018, "邮箱已被使用"),
    EMAIL_CODE_NOT_VALID(1019, "邮箱验证码不正确"),
    ADMIN_NOT_FOUND(1020, "管理员不存在"),
    ADMIN_EXISTS(1021, "管理员已经存在"),
    SCAN_CODE_NOT_FOUND(1022, "二维码失效了"),
    SCAN_CODE_IS_SCAN(1023, "二维码已被扫描"),
    SCAN_CODE_IS_UNSCAN(1024, "二维码还未被扫描"),
    USER_NOT_LOGGED(1025, "请先登录"),

    CATEGORY_NOT_EXIST(2001, "类目不存在"),
    CATEGORY_ATTRIBUTE_NOT_EXIST(2002, "类目属性不存在"),

    BRAND_NOT_EXIST(3001, "品牌不存在"),
    VIDEO_META_NOT_FOUND(3002, "视频绑定信息不存在"),
    BANNER_NOT_FOUND(3003, "Banner找不到了"),


    GOOD_NOT_EXIST(4001,"商品不存在"),
    //bi
    RECEIPT_NOT_VALID(1101, "支付凭证非法,支付失败"),
    RECEIPT_NET_BREAK(1102, "支付凭证验证失败,系统正在重试中请稍等..."),
    PRODUCT_NOT_THE_SAME(1103, "支付凭证和购买的商品不一致"),
    PRECEIPT_IS_USED(1104, "支付凭证已被使用"),
    PRODUCT_IAP_NOT_FOUND(1105, "充值选项不存在"),



    REC_TEACHER_NOT_FOUND(7001, "教师推荐找不到了"),
    REC_LESSON_NOT_FOUND(7002, "课程推荐找不到了"),
    MESSAGE_NOT_FOUND(7003, "推送消息找不到了"),
    FEEDBACK_NOT_FOUND(7004, "评价消息找不到了"),

    OPERATION_NOT_SUPPORT(403, "操作类型不支持");

    private int code;
    private String desc;

    private ErrorCodeDefine(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
